package org.dromara.common.core.spring;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class AppRuntime {

    @Value("${spring.application.name}")
    String appName;

    @Value("${spring.profiles.active}")
    String profile;

    public String getAppName() {
        return appName;
    }

    public String getProfile() {
        return profile;
    }

    public boolean isDev() {
        return profile.contains("dev") || profile.contains("test");
    }
}
